action.connect('pan', this._onPan.bind(this));
this._scrollView.add_action(action);
+ this._deletingFolder = false;
this._appIds = [];
this._redisplay();
}
// Remove the folder if this is the last app icon; otherwise,
// just remove the icon
if (folderApps.length == 0) {
+ this._deletingFolder = true;
+
// Resetting all keys deletes the relocatable schema
let keys = this._folder.settings_schema.list_keys();
for (const key of keys)
let folders = settings.get_strv('folder-children');
folders.splice(folders.indexOf(this._id), 1);
settings.set_strv('folder-children', folders);
+
+ this._deletingFolder = false;
} else {
// If this is a categories-based folder, also add it to
// the list of excluded apps
this._folder.set_strv('apps', folderApps);
}
}
+
+ get deletingFolder() {
+ return this._deletingFolder;
+ }
});
var FolderIcon = GObject.registerClass({
}
_sync() {
+ if (this.view.deletingFolder)
+ return;
+
this.emit('apps-changed');
this._updateName();
this.visible = this.view.getAllItems().length > 0;